package javaBase.nowcoder.HJ29_A_字符串加解密;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String args[]) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        String str1 = br.readLine();
        StringBuilder sb = new StringBuilder();
        StringBuilder sb1 = new StringBuilder();
        char[] chars = str.toCharArray();
        char[] chars1 = str1.toCharArray();
        for (int i = 0; i < chars.length; i++) {
            if (Character.isDigit(chars[i])) {
                if (chars[i] == '9') {
                    sb.append('0');
                } else {
                    sb.append((char) (chars[i] + 1));
                }
            }
            if (Character.isLetter(chars[i])) {
                if ('a' <= chars[i] && chars[i] < 'z') {
                    sb.append((char) (Character.toUpperCase(chars[i]) + 1));
                } else if ('A' <= chars[i] && chars[i] < 'Z') {
                    sb.append((char) (Character.toLowerCase(chars[i]) + 1));
                } else if (chars[i] == 'Z') {
                    sb.append('a');
                } else if (chars[i] == 'z') {
                    sb.append('A');
                }
            }
        }
        for (int i = 0; i < chars1.length; i++) {
            if (Character.isDigit(chars1[i])) {
                if (chars1[i] == '0') {
                    sb1.append('9');
                } else {
                    sb1.append((char) (chars1[i] - 1));
                }
            }
            if (Character.isLetter(chars1[i])) {
                if ('a' < chars1[i] && chars1[i] <= 'z') {
                    sb1.append((char) (Character.toUpperCase(chars1[i]) - 1));
                } else if ('A' < chars1[i] && chars1[i] <= 'Z') {
                    sb1.append((char) (Character.toLowerCase(chars1[i]) - 1));
                } else if (chars1[i] == 'A') {
                    sb1.append('z');
                } else if (chars1[i] == 'a') {
                    sb1.append('Z');
                }
            }
        }
        System.out.println(sb);
        System.out.println(sb1);
    }
}